
function page(type) {
    let num = $("#pageNum").val();
    num = num == "" ? 8 : parseInt(num);
    let size = $("#pageSize").val();
    size = size == "" ? 1 : parseInt(size);
    let count = $("#count").val();//总条数
    let endPage = count % num === 0 ? count / num : Math.ceil(count / num);
    switch (type) {
        case '0':
            size = 1;
            break;
        case '-':
            size = size == 1 ? 1 : --size;
            break;
        case '+':
            size = size == endPage ? endPage : ++size;
            break;
        case '1':
            //需要查询总条数
            size = endPage;
            break;
        case 'tz':
            //需要查询总条数
            size = $("#tiaozhuanSize").val() == "" ? 1 : parseInt($("#tiaozhuanSize").val());
            break;
    }
    chaxun(cookstyleid, num, size);
    $("#pageNum").val(num);
    $("#pageSize").val(size);
    $("#tiaozhuanSize").val(size);
}